Skip to content

ReactiveWindow class

Attributes: [DebuggerDisplay("{BindingRoot}, {ViewModel}")]

Defined in

Namespace: ReactiveUI Assembly: ReactiveUI.Wpf.dll Full name: ReactiveUI.ReactiveWindow<T> Modifiers: public

Summary

View source (opens in a new tab)

A Window (opens in a new tab) that is reactive.

Applies to

net481

Class hierarchy
classDiagram
class ReactiveWindow~T~
class Window
Window <|-- ReactiveWindow~T~
class IViewFor~TViewModel~ {
    <<interface>>
}
IViewFor~TViewModel~ <|.. ReactiveWindow~T~
class IViewFor {
    <<interface>>
}
IViewFor <|.. ReactiveWindow~T~
class IActivatableView {
    <<interface>>
}
IActivatableView <|.. ReactiveWindow~T~

Inherits from: Window (opens in a new tab)

Implements: IViewFor<TViewModel>, IViewFor, IActivatableView

Remarks

This class is a Window (opens in a new tab) that is also reactive. That is, it implements IViewFor. You can extend this class to get an implementation of IViewFor rather than writing one yourself.

Note that the XAML for your control must specify the same base class, including the generic argument you provide for your view model. To do this, use the TypeArguments attribute as follows:

<![CDATA[
 <rxui:ReactiveWindow
 x:Class="Foo.Bar.Views.YourView"
 x:TypeArguments="vms:YourViewModel"
 xmlns:rxui="http://reactiveui.net"
 xmlns:vms="clr-namespace:Foo.Bar.ViewModels"
 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
 mc:Ignorable="d">
 <!-- view XAML here -->
 </rxui:ReactiveWindow>
 ]]>

Constructors

NameSummary
.ctorInitializes a new instance of the [ReactiveWindow](# class.

Properties

NameSummary
BindingRootGets the binding root view model.
ViewModelGets or sets the view model displayed by the view.

Fields

NameSummary
static ViewModelPropertyThe view model dependency property.
Inherited members